package com.quanyan.operative.service;

import com.quanyan.api.APIResponse;
import com.quanyan.operative.model.resp.*;

import java.util.List;

/**
 * 鸟蛋夺宝service
 * <p>
 * Created by huadongyang on 2016/12/30.
 */
public interface SnatchService {
    /**
     * 获取夺宝商品列表
     *
     * @param type     排序类型 1：精选（默认） 2：进度 3：总需人数降序 4：总需人数升序
     * @param pageNum  第几页
     * @param pageSize 每页大小
     * @return
     */
    APIResponse getSnatchGoodsList(Byte type, Integer pageNum, Integer pageSize);

    /**
     * 生成指定商品的夺宝号
     *
     * @param issueID 夺宝期号
     * @return
     */
    APIResponse generateSnatchNum(Integer issueID);

    /**
     * 获取用户的兑奖码信息
     * @param uid
     * @param activityID
     * @param issueID
     * @param recordID
     * @return
     */
    APIResponse<RespPayCodes> getCodes(int uid, int activityID, int issueID, int recordID);

    /**
     * 获取用户的鸟蛋信息
     * @param uid
     * @return
     */
    APIResponse<Long> getEggsInfo(int uid);

    /**
     * 获取某期夺宝的参与者信息
     * @param activity
     * @param issueID
     * @param pageNo
     * @param perPage
     * @return
     */
    APIResponse<RespSnatchParticipantsInfo> getParticipants(int activity, int issueID, int pageNo, int perPage);



    /**
     * 支付
     * @param uid
     * @param activityID
     * @param issueID
     * @param anteNum
     * @return
     */
    APIResponse<RespPayCodes> doAnte(int uid, int activityID, final int issueID, int anteNum);

    /**
     * 获取夺宝记录
     * @param uid
     * @param issueID
     * @param pageNo
     * @param perPage
     * @return
     */
    APIResponse<RespSnatchRecords> snatchRecord(int uid, int issueID, int pageNo, int perPage);

    /**
     * 获取我的中奖纪录
     * @param uid
     * @param pageNo
     * @param perPage
     * @return
     */
    APIResponse<List<RespSnatchWinningInfo>> myWinnings(int uid, int pageNo, int perPage);

    /**
     * 获取中奖信息列表
     * @param pageNum
     * @param  pageSize
     * @return
     */
    APIResponse<RespWinningInfos> getWinningInfoList(Integer pageNum, Integer pageSize);

    APIResponse<RespEnterSpec> enterSpec(int uid, int activityID, int issueID);

    APIResponse<RespSnatchMine> mine(int uid, int type, int pageNo, int perPage);
}
